<template>
  <router-view v-slot="{ Component }">
    <component :is="Component" />
  </router-view>
</template>

<script setup>
import { refreshPage } from "./utils/tools";
import listenResizeChange, { removeListenScale } from "@/utils/px_rem";
import { onUnmounted, onDeactivated } from "vue";

listenResizeChange();

//  项目销毁的时候 移除事件监听
onUnmounted(() => {
  removeListenScale();
});

onDeactivated(() => {
  removeListenScale();
});

//  自动刷新页面
window.onload = () => {
  refreshPage();
};
</script>

<style lang="scss">
@import url(@/fonts/fonts.scss);
@import url(@/style.scss);
</style>
